var ControlFactory = function() {

	return {

		controls : {},

		bdControls : function(key) {
			var control;
			if (key == 'vpc') {
				control = new ViewPortCtl();
			} else if (key == 'ttc') {
				control = new TaskTreeCtl();
			} else if (key == 'kfc') {
				control = new KeyFrameCtl();
			} else if (key == 'tgc') {
				control = new TaskGridCtl();
			} else if (key == 'avc') {
				control = new AuditViewCtl();
			} else if (key == 'pc') {
				if (Ext.isIE) {
					control = new PlayerCtl();
				} else {
					control = new PlayerCtlMock();
				}
			} else if (key == 'aac') {
				control = new AutoAuditCtl();
			} else if (key == 'lbc') {
				control = new LabelCtl();
			} else if (key == 'mmc') {
				control = new MemoCtl();
			} else if (key == 'twc') {
				control = new TargetWinCtl();
			} else if (key == 's') {
				control = new Server();
			} else if (key == 'tfc') {
				control = new TargetFormCtl();
			}else if (key == 'gcc') {
				control = new GlobalConfigCtl();
			}
			return control;
		},

		getInstance : function() {
			return this;
		},
		putControls : function(key, o) {
			this.controls[key] = o;
		},
		getControls : function(key) {
			return this.controls[key];
		},
		getC : function(key) {
			var control = this.getControls(key);
			if (!control) {
				control = this.bdControls(key);
				this.putControls(key, control);
			}
			return control;
		}
	}
}();

var cf = ControlFactory;